<?php use_helper('Object','Validation') ?>
<?php echo form_tag('password_upgrade') ?>


<?php if (form_has_error('oldpassword') || form_has_error('password2')) { ?>
<?php
  $request = sfContext::getInstance()->getRequest();
  $error = $request->getError('oldpassword');
?>
<div class="message_error"><div class="rounded">
  <div class="tr"></div>
  <div class="tl"></div>
  <div class="br"></div>
  <div class="bl"></div>
  <h4 class="msg"><?php 
          echo image_tag('icons/exclamation.png');
       ?><?php echo $error; ?></h4>
  </div></div>
<br/>
<?php } ?>

<div class="formstyle">
  <div class="header"><h3>Modifica Password</h3></div>
  <ul class="form">
    <li>
      <div class="fright">
         <?php echo input_password_tag('oldpassword'); ?>
      </div>
      <?php echo label_for ('oldpassword', 'Vecchia password:') ?>
      <div id="r_username_msg" class="f5">la tua vecchia password</div>
    </li>
    <li>
      <div class="fright">
         <?php echo input_password_tag('password1'); ?>
      </div>
      <?php echo label_for ('password1', 'Nuova password:') ?>
      <div id="r_username_msg" class="f5">La tua nuova password</div>
    </li>
    <li>
      <div class="fright">
         <?php echo input_password_tag('password2'); ?>
      </div>
      <?php echo label_for ('password2', 'Conferma password:') ?>
      <div id="r_username_msg" class="f5">Conferma la tua nuova password</div>
    </li>
  </ul>
  <div class="submit">
    <?php echo submit_tag('Save') ?>
  </div>
</div>
</form>